# Copyright 2022 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Placeholder for internal Python strict library and test compatibility macro.

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

py_library(
    name = "optional_dependencies",
    srcs = [
        "optional_dependencies.py",
    ],
)

py_library(
    name = "serial_dispatcher",
    srcs = ["serial_dispatcher.py"],
    deps = [":mediapipe_c_utils"],
)

# Foreign Function Interface (FFI) defintion for the MediaPipe Tasks C API.
py_library(
    name = "mediapipe_c_bindings",
    srcs = [
        "mediapipe_c_bindings.py",
    ],
    data = [
        "//mediapipe/tasks/c:libmediapipe.so",
    ],
    deps = [
        ":mediapipe_c_utils",
        ":serial_dispatcher",
    ],
)

py_library(
    name = "base_options",
    srcs = ["base_options.py"],
    visibility = [
        "//mediapipe/model_maker:__subpackages__",
        "//mediapipe/tasks:users",
    ],
    deps = [
        ":base_options_c",
        ":optional_dependencies",
    ],
)

py_library(
    name = "base_options_c",
    srcs = ["base_options_c.py"],
)

py_library(
    name = "mediapipe_c_utils",
    srcs = ["mediapipe_c_utils.py"],
)

py_library(
    name = "async_result_dispatcher",
    srcs = ["async_result_dispatcher.py"],
    deps = [":mediapipe_c_utils"],
)
